题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=6755 题意:求一个式子,其中F是斐波那契数列 思路:因为斐波那契数列的通式为 所以式子可以化简为 又根据2mod 1e9+9的逆元为500000005,所以x^2≡5(mod 1e9+9)解得x为383 ...
分类:
其他好文 时间:
2020-07-24 21:48:42
阅读次数:
106
Escape HDU - 3533 题意: 小A要从$(0,0)\(逃到\)(n,m)$,他的精力值为$d$,每秒可以向东南西北四个方向走一格,或保持原地不动。但无论他是否移动,精力值每秒都会损失1点。路上他会遇到炮塔射击。给定$k$座炮塔的射击方向、射击间隔、子弹速度、坐标。第0秒小A开始逃跑,且 ...
分类:
其他好文 时间:
2020-07-24 21:45:27
阅读次数:
63
由于本人水平不够,这场多校只写了第1题和第10题 第1题 题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=6763 Problem A. Total Eclipse There are n cities and m bidirectional roads ...
分类:
其他好文 时间:
2020-07-24 21:43:59
阅读次数:
171
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=6768 题意:每个数可以化成斐波那契数列的形式,数列第i项为bi*Fi,bi等于0或1,且对于所有的i,bi*bi+1=0。 给你两个b数列A和B,以及一个b数列C,C数列是A和B的乘积修改第k位的1变成 ...
分类:
其他好文 时间:
2020-07-24 21:38:13
阅读次数:
88
import this The Zen of Python, by Tim Peters Beautiful is better than ugly. Explicit is better than implicit. Simple is better than complex. Complex i ...
分类:
编程语言 时间:
2020-07-24 21:08:55
阅读次数:
66
Eight 题意:八数码问题 思路:反向BFS+康托展开 const int maxn = 362885; const int FAC[] = { 1,1,2,6,24,120,720,5040,40320,362880,3628800 }; int cantor(int* a) {//算出全排列对 ...
分类:
其他好文 时间:
2020-07-24 09:46:19
阅读次数:
77
title: NEU_Train_Camp_2020_搜索和简单图论 date: 2020-07-05 22:38:11 tags: c++ categories: New cover: 搜索和简单图论 A - Knight Moves HDU 1372 每组数据输入两个坐标,(a-h)代表列,(1 ...
分类:
其他好文 时间:
2020-07-24 09:31:39
阅读次数:
102
先挖坑,过几天填 https://www.luogu.com.cn/training/14535#problems 可持久化数组 P3919 【模板】可持久化线段树 1(可持久化数组) #include<bits/stdc++.h> using namespace std; const int ma ...
分类:
其他好文 时间:
2020-07-23 23:30:13
阅读次数:
112
赛后3min 1A...自闭_(:з」∠)_ 题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=6770 题目大意:维护一个由函数\(f_i(x)=(x-a_i)^4+b_i\)组成的集合,要求实现插入、删除、以及查询\(x\):求\(f_i(x)\)的最 ...
分类:
其他好文 时间:
2020-07-23 23:09:00
阅读次数:
92
一维差分:(博客图片来源:here) 设有一个序列\(a_{1},a_{2},a_{3},\cdots ,a_{4}\) 我们定义一个新的序列: \[\left\{\begin{matrix}b_{i}=a_{i} & i=1\\b_{i}=a_{i}-a_{i-1}& i\neq 1\end{ma ...
分类:
其他好文 时间:
2020-07-23 23:00:31
阅读次数:
91